<?php



function fetch_categorie($id) {

$rq = sql::query("SELECT id_cat, title_cat FROM categorie WHERE id_cat = ".$id."");

$rs = sql::to_array($rq);


return $rs['title_cat'];
}

function desc_categorie($id) {

$rq = sql::query("SELECT id_cat, title_cat, desc_cat FROM categorie WHERE id_cat = ".$id."");

$rs = sql::to_array($rq);


return $rs['desc_cat'];
}

class BlogConfig
{
	public $title;
	public $maintenance;
	public $maintenance_msg;
	
	public function __construct() { }
	
	public function retrieve_cfg( $item )
	{
	
		$conf_rq = sql::query("SELECT config_nom, config_valeur FROM blog_config WHERE config_nom = '".$item."'");
		$conf = mysql_fetch_assoc($conf_rq);
		$conf['config_nom'] = $conf['config_valeur'];
		return $conf['config_valeur'];
	}
		
	
}

$config = new BlogConfig();